package cn.com.dhcc.turbo.web.controller.sysmgr;

import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.dhcc.app.core.AppEnv;
import cn.com.dhcc.app.core.base.BaseController;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.core.service.Log.LOGTYPE;
@Controller
@RequestMapping("pub/config/")
public class ConfigController  extends BaseController{
Logger logger = Log.getLogger(LOGTYPE.TURBO);
	
	@RequestMapping("reload")
	@ResponseBody
	public void reloadProperties(Model model,HttpServletResponse response){
		
		try{
			AppEnv.loadPropertiesFiles();
			try {
				writeString(response, "加载成功");
			} catch (Exception e) {
			}
		} catch (Exception e) {
			try {
				writeString(response, "加载失败,"+e.getMessage());
			} catch (Exception e1) {
			}
		}
	}
}
